home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / tex / dvivga9.zip / MACHDEFS.H < prev    next >
C/C++ Source or Header  |  1988-06-15  |  26KB  |  834 lines

  1. /* -*-C-*- machdefs.h */
  2. /*-->machdefs*/
  3. /**********************************************************************/
  4. /****************************** machdefs ******************************/
  5. /**********************************************************************/
  6.  
  7. /***********************************************************************
  8.  
  9. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  10. This file should contain definitions for symbols used for all  operating
  11. system /  implementation  dependencies, and  if  the driver  family  has
  12. already been implemented on  you machine, this should  be the only  file
  13. requiring changes.
  14.  
  15. How to change this file:
  16.     * locate the operating system and implementation definitions;
  17.       they are surrounded by "=====" comment strings.
  18.     * comment out the definitions you do not want, and select the
  19.       ones for your system
  20.     * if adding a new operating system, create a new symbol OS_xxx
  21.       for it and add a new #if OS_xxx ... #endif section for its
  22.       changes.
  23.         * if adding a new implementation for an existing operating
  24.       system, create a new symbol for it and add appropriate
  25.       conditionals inside its #if OS_xxx ... #end section.
  26.     * if you must replace a standard C library function, replace
  27.       instances of its use in the source code with an upper-case
  28.       equivalent (e.g. ungetc --> UNGETC), then define the
  29.       upper-case name below in the generic section, plus the
  30.       operating-system section.
  31.  
  32. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  33.  
  34. List of symbols actually used for #if's [14-Aug-87]
  35.  
  36. Flags and strings:
  37.     ALLOW_INTERRUPT    -- allow interactive interrupt
  38.     ANSI_PROTOTYPES    -- draft ANSI C function prototype declarations are
  39.                supported
  40.     ANSI_LIBRARY    -- draft ANSI C library functions conformance
  41.     ARITHRSHIFT    -- implementation uses arithmetic (not logical) right
  42.                shift
  43.     DVIHELP        -- how to find documentation (for usage())
  44.     DVIPREFIX    -- prefix to standard 3-character extension of output
  45.                and log files
  46.     FASTZERO    -- fast bitmap zeroing by external assembly language
  47.                routine
  48.     FONTLIST    -- font type search list (PK, GF, PXL)
  49.     FONTPATH    -- font directory path
  50.     HIRES        -- high resolution variant of bitmap output
  51.     HOST_WORD_SIZE    -- host integer word size in bits
  52.         PS_MAXWIDTH    -- approximate line width limit for PostScript output
  53.     PS_SHORTLINES    -- shorter output lines in PostScript
  54.     PS_XONXOFFBUG    -- PostScript version 23.0 Xon/Xoff bug workaround
  55.     PXLID        -- TeX PXL file ID
  56.     RB_OPEN        -- fopen() mode flags for binary read
  57.     SEGMEM        -- segmented memory (Intel); bitmap is raster vector
  58.     STDRES        -- standard resolution (200 dpi)
  59.     SUBPATH        -- substitution font file path
  60.     TEXFONTS    -- TeX font file path environment variable
  61.     TEXINPUTS    -- TeX input file path environment variable
  62.     USEGLOBALMAG    -- allow runtime global magnification scaling
  63.     VIRTUAL_FONTS    -- implement virtual font caching
  64.     WB_OPEN        -- fopen() mode flags for binary write
  65.     ZAPTHISOUT    -- remove some obsolete code
  66.  
  67. Alternate library routines  for misfeature workarounds  (these have  the
  68. same names as standard library routines, but upper-cased):
  69.     EXIT
  70.     FOPEN
  71.     FSEEK
  72.     FTELL
  73.     GETENV
  74.     MALLOC(n)
  75.     READ
  76.     REWIND(fp)
  77.     UNGETC
  78.  
  79. C Implementations:
  80.     ATT        -- AT&T Unix (System III, V)
  81.     BSD41        -- Berkeley 4.1BSD
  82.     BSD42        -- Berkeley 4.2BSD
  83.     HPUX        -- HP 9000 series Unix (System V based)
  84.     IBM_PC_LATTICE    -- IBM PC Lattice C compiler
  85.     IBM_PC_MICROSOFT-- IBM PC Microsoft Version 3.x or later C compiler
  86.     IBM_PC_WIZARD    -- IBM PC Wizard C compiler
  87.     KCC_20        -- SRI's KCC Compiler on TOPS-20
  88.     PCC_20        -- Portable C Compiler on TOPS-20
  89.  
  90. Operating systems:
  91.     OS_ATARI    -- Atari 520ST+ TOS (similar to MS DOS)
  92.     OS_PCDOS    -- IBM (and clones) PC DOS and MS DOS
  93.     OS_TOPS20    -- DEC-20 TOPS-20
  94.     OS_UNIX        -- Unix (almost any variant)
  95.     OS_VAXVMS    -- VAX VMS
  96.  
  97. Device names (defined in each DVIxxx.C file):
  98.     APPLEIMAGEWRITER -- Apple ImageWriter printer
  99.     BBNBITGRAPH    -- BBN BitGraph terminal
  100.     CANON_A2    -- Canon LBP-8 A2 laser printer
  101.     DECLA75        -- DEC LA75 printer
  102.     DECLN03PLUS    -- DEC LN03-PLUS laser printer
  103.     EPSON        -- Epson 9-pin family dot-matrix printer
  104.     GOLDENDAWNGL100    -- Golden Dawn GL100 laser printer
  105.     HPJETPLUS    -- Hewlett-Packard Laser Jet Plus (downloaded fonts)
  106.     HPLASERJET    -- Hewlett-Packard Laser Jet (bitmap display)
  107.     IMPRESS        -- imPRESS (IMAGEN laser printer)
  108.     MPISPRINTER    -- MPI Sprinter printer
  109.     OKIDATA2410    -- OKIData 2410 printer
  110.     POSTSCRIPT    -- Adobe PostScript (Apple LaserWriter laser printer)
  111.     PRINTRONIX    -- Printronix (DEC LXY-11, C-Itoh) printer
  112.     TOSHIBAP1351    -- Toshiba P-1351 dot matrix printer
  113.  
  114. ***********************************************************************/
  115.  
  116. /**********************************************************************
  117. Define all symbols for devices, operating systems, and implementations
  118. to be explicitly 0, unless it is expected that they might be set at
  119. compile time.
  120. ***********************************************************************/
  121.  
  122. #define ALLOW_INTERRUPT    0
  123. #define ANSI_PROTOTYPES    0
  124.  
  125. #ifndef ANSI_LIBRARY        /* may be specified at compile time */
  126. #define ANSI_LIBRARY    0
  127. #endif
  128.  
  129. #if    ANSI_LIBRARY
  130. #undef ANSI_PROTOTYPES
  131. #define ANSI_PROTOTYPES    1    /* If library conforms, declarations do too */
  132. #endif
  133.  
  134. #define ARITHRSHIFT    1 /* most C compilers use arithmetic right shift */
  135. #define DISKFULL(fp)    (ferror(fp) && (errno == ENOSPC))
  136. #define DVIEXT        ".dvi"
  137. #define DVIPREFIX    "dvi-"
  138. #define EXIT        exit
  139. #define FASTZERO    0
  140.  
  141. /* The following definitions work for at least PCC-20, BSD 4.2 and  4.3,
  142. and HPUX;  VAX  VMS  has  an extra  level  of  indirection.   Check  the
  143. definition of fileno(fp) in stdio.h; on PCC-20, it is
  144.     #define fileno(p) ((p)->_file)
  145. */
  146. #define FILE_CNT(fp)    (fp)->_cnt
  147. #define FILE_BASE(fp)    (fp)->_base
  148. #define FILE_PTR(fp)    (fp)->_ptr
  149.  
  150. /* #define FONTLIST    0 -- can be set at compile time */
  151. /* #define FONTPATH    0 -- can be set at compile time */
  152.  
  153. #define FOPEN        fopen
  154. #define FSEEK        fseek
  155. #define FTELL        ftell
  156. #define GETENV        getenv
  157. #define HIRES        0
  158. #define MALLOC(n)    malloc(n)
  159. #define MAXDRIFT    2    /* we insist that
  160.                 abs|(hh-pixel_round(h))<=MAXDRIFT| */
  161.  
  162. /* MAXOPEN  should  be 6  less  than the  system  limit on  open  files,
  163. allowing for  files  open  on stdin,  stdout,  stderr,  .dvi,  .dvi-log,
  164. .dvi-xxx, plus MAXOPEN font  files.  It may  be additionally limited  by
  165. the amount of memory available for buffers (e.g. IBM PC). */
  166. #define MAXOPEN        14
  167.  
  168. /* #define PS_MAXWIDTH  72 -- can be set at compile time */
  169.  
  170. /* #define PS_SHORTLINES 0 -- can be set at compile time */
  171.  
  172. #define PS_XONXOFFBUG    0
  173. #define PXLID        0
  174. #define RB_OPEN        "r"
  175.  
  176. /* For virtual font caching to succeed, read() must return the requested
  177. number of bytes, and  preferably do this  with one system   call  and no
  178. double buffering. */
  179.  
  180. #define READ        read
  181.  
  182. /* In  many  implementations, rewind(fp)  is  defined as  equivalent  to
  183. fseek(fp,0L,0).  In  some, however  (e.g.  PCC-20,  and probably  others
  184. based on PCC), it additionally discards input buffer contents, which may
  185. cause unnecessary I/O, and in the case of virtual font caching,   clears
  186. the cache.  Defining  it in  terms of fseek()  should be  okay, but  the
  187. implementation of fseek() should be checked. */
  188.  
  189. #define REWIND(fp)    FSEEK(fp,0L,0)
  190.  
  191. #define SEGMEM        0    /* may be reset by dvixxx for big bitmaps */
  192. #define STDRES        0
  193.  
  194. /* #define SUBPATH    0 -- can be set at compile time */
  195.  
  196. #define SUBEXT        ".sub"
  197. #define SUBNAME        "texfonts"
  198.  
  199. /* #define TEXFONTS    0 -- can be set at compile time */
  200. /* #define TEXINPUTS    0 -- can be set at compile time */
  201.  
  202. #define UNGETC        ungetc
  203. #define USEGLOBALMAG    0
  204. #define WB_OPEN        "w"
  205. #define ZAPTHISOUT    0
  206.  
  207.  
  208. /**********************************************************************/
  209. /* Clear all implementation/operating-system flags--reset later */
  210.  
  211. #define ATT        0    /* define zero or one of these */
  212. #define BSD41        0
  213. #define BSD42        0
  214. #define HPUX        0
  215. #define IBM_PC_LATTICE    0
  216. #define IBM_PC_MICROSOFT    0
  217. #define IBM_PC_WIZARD    0
  218. #define KCC_20        0
  219. #define PCC_20        0
  220.  
  221. #define OS_ATARI    0    /*